import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: "/",
    redirect:"/home",
  },
  {
    path: "/home",
    name: "home",
    component: HomeView
  },
  {
    path: "/list",
    name: "list",
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/ListView.vue')
  },{
    path:"/about",
    name:"about",
    component:()=> import('../views/AboutView.vue')
  },{
    path:"/shop",
    name:"shop",
    component:()=> import('../views/ShopView.vue'),
    
  },{
    path:"/user",
    name:"user",
    component:()=> import('../views/UserView.vue')
  },{
    path:"/item",
    name:"item",
    component:()=> import('../views/ItemSelect.vue')
  },{
    path:"/cart",
    name:"cart",
    component:()=> import('../views/CarView.vue')
  },{
    path:"/login",
    name:"login",
    component:()=>import('../views/LoginView.vue')
  }
]

const router = new VueRouter({
  routes
})

export default router
